package com.oyb.util;

import sun.applet.Main;

import java.io.IOException;
import java.util.Map;
import java.util.Properties;

public class PropertiesUtils {

    private static Properties properties = new Properties();

    static {
        //读取配置文件
        try {
            properties.load(PropertiesUtils.class.getClassLoader().getResourceAsStream("application.properties"));
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
    public static  String getProperties(String key){
        return properties.getProperty(key);
    }

    public static Properties getPropertiesObj() {
        return properties;
    }
}
